package com.zxx.cascommon.base.result;

/**
 * 统一返回实体
 *
 * @author zhoukai
 * @date 2020/3/12 18:27
 */
public class Result {

    /**
     * 返回状态码
     */
    private Integer code;

    /**
     * 返回消息描述
     */
    private String msg;

    /**
     * 返回实体数据
     */
    private Object data;

    public Result() {
    }

    public Result(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Result(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" + "code=" + code + ", msg='" + msg + '\'' + ", data=" + data + '}';
    }
}

